package com.zhixiang.xaec.service.system.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zhixiang.core.dao.BaseDao;
import com.zhixiang.core.service.impl.BaseServiceImpl;
import com.zhixiang.xaec.dao.system.TemplateAttributesDao;
import com.zhixiang.xaec.entity.system.TemplateAttributes;
import com.zhixiang.xaec.service.system.TemplateAttributesService;
@Service
public class TemplateAttributesServiceImpl extends BaseServiceImpl<TemplateAttributes, Long> implements TemplateAttributesService
{

    @Override
    public String delete(String[] ids)
    {
        for(String id:ids){
            getDao().remove(Long.valueOf(id));            
        }
        return null;
    }

    @Override
    @Resource(type=TemplateAttributesDao.class)
    public void setBaseDao(BaseDao<TemplateAttributes, Long> dao)
    {
        setDao(dao);        
    }

    @Override
    public List<TemplateAttributes> findAttriBytId(Long tId)
    {
        return getDao().findByHql("FROM TemplateAttributes ta WHERE ta.template.id=?", new Object[]{tId});
        
    }



}
